package com.hhkj.study.admin.resource.excel;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author luowu
 * @Date 2024/9/24 涵 15:30:15
 */
@Data
public class ResourceLivePlayBackExcelRes extends BaseExcelRes {

    /**
     * 直播课名称
     */
    @NotBlank(message = "直播课名称不能为空")
    @Excel(name = "直播名称", width = 20, needMerge = true, require = true)
    private String liveName;

    /**
     * 回放url
     */
    @NotBlank(message = "回放url不能为空")
    @Excel(name = "回放url", width = 20, needMerge = true, require = true)
    private String playBackUrl;

    /**
     * 直播课id
     */
    private Long liveId;

    /**
     * 直播的课程id
     */
    @NotNull(message = "课程类型内容为空或不合法")
    @Excel(name = "课程类型", width = 20, needMerge = true, customDictType = "courseTypeCode", needFilterStr = StrUtil.DASHED, require = true)
    private Long courseType;

    /**
     * 直播的讲师
     */
    private Long teacherId;

    /**
     * 直播的年份
     */
    private String year;

    @Override
    public Long getResourceCourseType() {
        return this.courseType;
    }

    @Override
    public String getTitle() {
        return "直播回放导入模板\n" +
                "1、表头红色加粗为必填字段";
    }

    @Override
    public String getSheetName() {
        return "直播回放导入模板";
    }
}
